import { CustomFunction } from '../../services/custom-function.service';

export function createCustomFunctionCategory(customFunctions: CustomFunction[]) {
  const blocks = customFunctions.map(func => {
    return { 
      kind: 'block', 
      type: `custom_function_${func.name}` ,
    };
  });
  
  return {
    kind: 'category',
    name: '自定义函数',
    colour: '290',
    contents: blocks
  };
} 